package com.wanho.java157.crm.systemSettings.manage.controller;

import com.wanho.java157.crm.systemSettings.manage.po.Employee;
import com.wanho.java157.crm.systemSettings.manage.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/employee")
public class EmployeeController {
    @Autowired
    private EmployeeService employeeService ;
    @RequestMapping("/list")
    public String list(Model model){
        List<Employee> employeeList = employeeService.selectEmployeeAndDepartmentAndPosition();
        model.addAttribute("employeeList",employeeList) ;
        return "systemSettings/manage/index" ;
    }
}
